<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::dm::subject类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../d8/d2d/namespacewheels_1_1dm.html">dm</a></li><li class="navelem"><a class="el" href="../../d4/d71/classwheels_1_1dm_1_1subject.html">subject</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#pub-types">Public 类型</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="../../d5/d80/classwheels_1_1dm_1_1subject-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::dm::subject类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>数据改变的模块  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a>&gt;</code></p>
<div class="dynheader">
wheels::dm::subject 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../d5/dd1/classwheels_1_1dm_1_1subject__coll__graph.png" border="0" usemap="#awheels_1_1dm_1_1subject_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1dm_1_1subject_coll__map" id="awheels_1_1dm_1_1subject_coll__map">
<area shape="rect" title="数据改变的模块" alt="" coords="5,5,184,245"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d1/dee/classwheels_1_1dm_1_1subject_1_1observer____.html">observer__</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-types" name="pub-types"></a>
Public 类型</h2></td></tr>
<tr class="memitem:a2d883e40ca20662c325ec6e9d244634e" id="r_a2d883e40ca20662c325ec6e9d244634e"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a2d883e40ca20662c325ec6e9d244634e">obsvFunc_t</a> = std::function&lt; void ( const std::vector&lt;<a class="el" href="../../dd/d54/classwheels_1_1variant.html">wheels::variant</a>&gt;&amp; ) &gt;</td></tr>
<tr class="separator:a2d883e40ca20662c325ec6e9d244634e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:acf069e1ce8f25ff0eff325fef0c0575d" id="r_acf069e1ce8f25ff0eff325fef0c0575d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#acf069e1ce8f25ff0eff325fef0c0575d">subject</a> ()</td></tr>
<tr class="separator:acf069e1ce8f25ff0eff325fef0c0575d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aed01d515dc4c4848e4e93dfeeb551f22" id="r_aed01d515dc4c4848e4e93dfeeb551f22"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#aed01d515dc4c4848e4e93dfeeb551f22">~subject</a> ()</td></tr>
<tr class="separator:aed01d515dc4c4848e4e93dfeeb551f22"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a64f0174ff955bec8b984dd4211826a6d" id="r_a64f0174ff955bec8b984dd4211826a6d"><td class="memTemplParams" colspan="2">template&lt;typename realType &gt; </td></tr>
<tr class="memitem:a64f0174ff955bec8b984dd4211826a6d"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a64f0174ff955bec8b984dd4211826a6d">addObserver</a> (realType *obsv)</td></tr>
<tr class="memdesc:a64f0174ff955bec8b984dd4211826a6d"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加观察者对象  <br /></td></tr>
<tr class="separator:a64f0174ff955bec8b984dd4211826a6d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a471a3a549c476a03cc41fd80b7b95c95" id="r_a471a3a549c476a03cc41fd80b7b95c95"><td class="memItemLeft" align="right" valign="top"><a class="el" href="../../df/d8d/classwheels_1_1dm_1_1observer.html">observer</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a471a3a549c476a03cc41fd80b7b95c95">addObserver</a> (<a class="el" href="#a2d883e40ca20662c325ec6e9d244634e">obsvFunc_t</a> func)</td></tr>
<tr class="memdesc:a471a3a549c476a03cc41fd80b7b95c95"><td class="mdescLeft">&#160;</td><td class="mdescRight">添加观察者函数  <br /></td></tr>
<tr class="separator:a471a3a549c476a03cc41fd80b7b95c95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05ac0e5bcadf14af3a29907a14c06665" id="r_a05ac0e5bcadf14af3a29907a14c06665"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a05ac0e5bcadf14af3a29907a14c06665">removeObserver</a> (<a class="el" href="../../df/d8d/classwheels_1_1dm_1_1observer.html">observer</a> *obsv)</td></tr>
<tr class="memdesc:a05ac0e5bcadf14af3a29907a14c06665"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除观察者对象  <br /></td></tr>
<tr class="separator:a05ac0e5bcadf14af3a29907a14c06665"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2e8c5831d40a9cbc7eb79786ce519ef1" id="r_a2e8c5831d40a9cbc7eb79786ce519ef1"><td class="memTemplParams" colspan="2">template&lt;typename ... Args&gt; </td></tr>
<tr class="memitem:a2e8c5831d40a9cbc7eb79786ce519ef1"><td class="memTemplItemLeft" align="right" valign="top">void&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="#a2e8c5831d40a9cbc7eb79786ce519ef1">notifyObservers</a> (Args &amp;&amp;... args)</td></tr>
<tr class="memdesc:a2e8c5831d40a9cbc7eb79786ce519ef1"><td class="mdescLeft">&#160;</td><td class="mdescRight">执行通知操作  <br /></td></tr>
<tr class="separator:a2e8c5831d40a9cbc7eb79786ce519ef1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>数据改变的模块 </p>

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00061">61</a> 行定义.</p>
</div><h2 class="groupheader">成员类型定义说明</h2>
<a id="a2d883e40ca20662c325ec6e9d244634e" name="a2d883e40ca20662c325ec6e9d244634e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2d883e40ca20662c325ec6e9d244634e">&#9670;&#160;</a></span>obsvFunc_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="#a2d883e40ca20662c325ec6e9d244634e">wheels::dm::subject::obsvFunc_t</a> = std::function&lt; void ( const std::vector&lt;<a class="el" href="../../dd/d54/classwheels_1_1variant.html">wheels::variant</a>&gt;&amp; ) &gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00063">63</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">构造及析构函数说明</h2>
<a id="acf069e1ce8f25ff0eff325fef0c0575d" name="acf069e1ce8f25ff0eff325fef0c0575d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf069e1ce8f25ff0eff325fef0c0575d">&#9670;&#160;</a></span>subject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">wheels::dm::subject::subject </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00079">79</a> 行定义.</p>

</div>
</div>
<a id="aed01d515dc4c4848e4e93dfeeb551f22" name="aed01d515dc4c4848e4e93dfeeb551f22"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aed01d515dc4c4848e4e93dfeeb551f22">&#9670;&#160;</a></span>~subject()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">virtual wheels::dm::subject::~subject </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00091">91</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a471a3a549c476a03cc41fd80b7b95c95" name="a471a3a549c476a03cc41fd80b7b95c95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a471a3a549c476a03cc41fd80b7b95c95">&#9670;&#160;</a></span>addObserver() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../df/d8d/classwheels_1_1dm_1_1observer.html">observer</a> * wheels::dm::subject::addObserver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="#a2d883e40ca20662c325ec6e9d244634e">obsvFunc_t</a></td>          <td class="paramname"><span class="paramname"><em>func</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>添加观察者函数 </p>

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00110">110</a> 行定义.</p>

</div>
</div>
<a id="a64f0174ff955bec8b984dd4211826a6d" name="a64f0174ff955bec8b984dd4211826a6d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a64f0174ff955bec8b984dd4211826a6d">&#9670;&#160;</a></span>addObserver() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename realType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void wheels::dm::subject::addObserver </td>
          <td>(</td>
          <td class="paramtype">realType *</td>          <td class="paramname"><span class="paramname"><em>obsv</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>添加观察者对象 </p>

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00102">102</a> 行定义.</p>

</div>
</div>
<a id="a2e8c5831d40a9cbc7eb79786ce519ef1" name="a2e8c5831d40a9cbc7eb79786ce519ef1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2e8c5831d40a9cbc7eb79786ce519ef1">&#9670;&#160;</a></span>notifyObservers()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;typename ... Args&gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void wheels::dm::subject::notifyObservers </td>
          <td>(</td>
          <td class="paramtype">Args &amp;&amp;...</td>          <td class="paramname"><span class="paramname"><em>args</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>执行通知操作 </p>

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00144">144</a> 行定义.</p>

</div>
</div>
<a id="a05ac0e5bcadf14af3a29907a14c06665" name="a05ac0e5bcadf14af3a29907a14c06665"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a05ac0e5bcadf14af3a29907a14c06665">&#9670;&#160;</a></span>removeObserver()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void wheels::dm::subject::removeObserver </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="../../df/d8d/classwheels_1_1dm_1_1observer.html">observer</a> *</td>          <td class="paramname"><span class="paramname"><em>obsv</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>移除观察者对象 </p>

<p class="definition">在文件 <a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a> 第 <a class="el" href="../../d6/da0/observer_8hpp_source.html#l00127">127</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/designM/<a class="el" href="../../d6/da0/observer_8hpp_source.html">observer.hpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
